package com.zzl.finance.data.dto;

import com.zzl.apidoc.annotation.ApidocModel;
import com.zzl.apidoc.annotation.ApidocModelProperty;
import com.zzl.apidoc.constants.RequiredType;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

/**
 * @author gull
 * @date 2021-11-09 20:04:58
 */
@Data
@ApidocModel
@SuppressWarnings("javadoc")
public class VoucherEnterpriseAddDto implements Serializable {
    private static final long serialVersionUID = 1L;

    @Length(max = 50)
    @NotBlank(message = "企业名称不能为空")
    @ApidocModelProperty(description = "企业名称", required = RequiredType.TRUE, example = "企业名称示例")
    private String enterpriseName;
    @Length(max = 50)
    @NotBlank(message = "统一社会信用代码不能为空")
    @ApidocModelProperty(description = "统一社会信用代码", required = RequiredType.TRUE, example = "6789HJKJHGJK")
    private String socialCreditCode;

    @NotBlank(message = "管理员手机号不能为空")
    @Pattern(regexp = "(^1[0-9]{10}$)", message = "管理员手机号输入不正确！")
    @ApidocModelProperty(description = "管理员手机号", required = RequiredType.TRUE, example = "17302535653")
    private String adminPhone;

    @ApidocModelProperty(description = "获客渠道，0自荐")
    private String customerChannel;

    @NotBlank(message = "登录人账号为空")
    @Length(max = 32)
    @ApidocModelProperty(description = "登录人账号", required = RequiredType.TRUE, example = "gull")
    private String userName;

    @NotBlank(message = "密码不能为空")
    @Pattern(regexp = "^[a-zA-Z0-9]{6,18}$", message = "请输入6~18位的字母和数字组合")
    @ApidocModelProperty(description = "密码", required = RequiredType.TRUE, example = "111111z")
    private String userPassword;

    @ApidocModelProperty(description = "邀请企业id")
    private String invitationEnterpriseId;
    @NotNull(message = "企业类别不能为空")
    @ApidocModelProperty(description = "企业类别0.核心企业1.供应商，2集团", required = RequiredType.TRUE, example = "1")
    private Integer category;
    @ApidocModelProperty(description = "厂子的上级集团企业id")
    private String enterpriseParentId;

}
